Tryit Editor v2.3

Edit This Code:
<!DOCTYPE html> <html> <head> <script> function bgChange(bg) { document.body.style.background = bg; } </script> </head> <body> <h2>Change background color</h2> <p>Mouse over the squares!</p> <table style="width:300px;height:100px"> <tr> <td onmouseover="bgChange(this.style.backgroundColor)" onmouseout="bgChange('transparent')" style="background-color:Khaki"> </td> <td onmouseover="bgChange(this.style.backgroundColor)" onmouseout="bgChange('transparent')" style="background-color:PaleGreen"> </td> <td onmouseover="bgChange(this.style.backgroundColor)" onmouseout="bgChange('transparent')" style="background-color:Silver"> </td> </tr> </table> </body> <!-- Mirrored from www.w3schools.com/js/tryit.asp?filename=tryjs_dom_css_bgcolor by HTTrack Website Copier/3.x [XR&CO'2014], Fri, 23 Jan 2015 07:24:41 GMT --> </html>
Result:
Try it Yourself - © w3schools.com